package com.tao.to;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.tao.base.BaseEntity;

/**
 * The persistent class for the sp_user2product database table.
 * 
 */
@Entity
@Table(name = "t_user2product")
public class User2ProductTO extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "USER_PRODUCT_ID", nullable = false, length = 50)
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "uuid2")
	private String userProductId;

	// bi-directional many-to-one association to UserTO
	@ManyToOne
	@JoinColumn(name = "USER_ID", nullable = false)
	private UserTO userTO;

	// bi-directional many-to-one association to ProductTO
	@ManyToOne
	@JoinColumn(name = "PRODUCT_ID", nullable = false)
	private ProductTO productTO;

	public User2ProductTO() {
	}

	public String getUserProductId() {
		return userProductId;
	}

	public void setUserProductId(String userProductId) {
		this.userProductId = userProductId;
	}

	public UserTO getUserTO() {
		return userTO;
	}

	public void setUserTO(UserTO userTO) {
		this.userTO = userTO;
	}

	public ProductTO getProductTO() {
		return productTO;
	}

	public void setProductTO(ProductTO productTO) {
		this.productTO = productTO;
	}

}